<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <link rel="stylesheet" type="text/css" href="./css/aui-slide.css" />
    <script type="text/javascript" src="./script/jquery.min.js"></script>
    <script type="text/javascript" src="./script/base.js"></script>
    <script type="text/javascript" src="./script/doT.min.js"></script>
    <script type="text/javascript" src="./script/jquery-3.2.0.js"></script>
    <link rel="stylesheet" type="text/css" href="./css/api.css" />

</head>

<body>
    <header class="aui-bar aui-bar-nav" id='topbar'>
        <a class="aui-pull-left" onclick="closeWin()">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title" id="title_head"></div>
    </header>
    <div class="aui-bar-nav-d"></div>
    <!-- <div id='title'>
    </div>
    <div id='update_time'>
    </div> -->

    <div>
        <img id="img">
    </div>
    <div class="news-detail-t" id='list'>
        <!-- 2017年8月23日 -->
    </div>
    <!-- <div class="news-detail" id='description'>
    </div> -->
</body>
</body>
<script type="text/javascript">
    apiready = function() {
        var title = api.pageParam.title;
        $('#title_head').text(title);
        var n = api.pageParam.id;
        fnGetNewData(n);


    };

    function fnGetNewData(n) {

        api.showProgress({
            style: 'default',
            animationType: 'fade',
            title: '努力加载中...',
            text: '先喝杯茶...',
            modal: false
        });

        api.ajax({
            url: webAddress + '/index.php?ctl=app_article&act=article_content',
            method: 'post',
            data: {
                values: {
                    id: n
                },
            }
        }, function(ret, err) {
            if (ret) {
                upDataNew(ret);
                api.hideProgress();
            }
        });
    }

    function upDataNew(data) {
        var newData = data.content;
        newData = newData.replace(/\/app\/Tpl/g, 'http://www.big-wealth.com/app/Tpl');
        newData = newData.replace(/src="\/public\/attachment/g, 'src="http://www.big-wealth.com/public/attachment');
        newData = newData.replace(/\.\/public\/attachment/g, 'http://www.big-wealth.com/public/attachment');
        newData = newData.replace(/src=http/g, 'src="http');
        // alert(newData);
        // document.getElementById("title").innerHTML = data.title;
        // document.getElementById("update_time").innerHTML = data.update_time;
        document.getElementById("list").innerHTML = newData;
        // document.getElementById("description").innerHTML = data.description;
        if (data.icon == false) {

        } else {
            var img = webAddress + data.icon;
            document.getElementById("img").src = img;
        }
    }

    function closeWin() {


        api.closeWin({});
    }
</script>

</html>
